package com.googlecode.monitoring.db.model;

import java.util.Calendar;

/**
 * Author: Sergiy Doroshenko
 * Date: May 26, 2010
 * Time: 12:30:54 PM
 */
public enum AgeType {
	SECOND(Calendar.SECOND, 1000L),
	MINUTE(Calendar.MINUTE, 60000L),
	HOUR(Calendar.HOUR, 3600000L),
	DAY(Calendar.DAY_OF_MONTH, 24 * 3600000L),
	BANKINGDAY(null, null),
	MONTH(Calendar.MONTH, null),
	YEAR(Calendar.YEAR, 365 * 3600000L);


	private Long miliseconds;
	private Integer calendarField;

	AgeType(Integer calendarField, Long miliseconds) {
		this.calendarField = calendarField;
		this.miliseconds = miliseconds;
	}

	public Long getMiliseconds() {
		return miliseconds;
	}

	public Integer getCalendarField() {
		return calendarField;
	}
}
